package com.ymatou.iapi.godmch.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.iapi.godmch.parameter.createZdBean;
import com.ymatou.iapi.godmch.parameter.createmchBean;
import com.ymatou.iapi.godmch.service.createZdCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
import com.ymttest.business.service.shenqi.GodmchManageCallService;
import com.ymttest.utils.TestDataManager;
/**
*商户新增客服(业务变更)
*FreeMaker Template自动生成代码
*/
@TestSuite
@Ignore
public class Ts_createZd{
	private static createZdBean bean;
	private static createZdCall call;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("商户新增客服(业务变更)");
	}

	@Before
	public void caseUp() {
		bean=new createZdBean();
		call=new createZdCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(call.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_createZd_001() {
		Logger.start(true,"正例-商户新增客服(业务变更)");
		try {
			createmchBean createmchBean=GodmchManageCallService.InitcreatemchBeanForChannel();
			GodmchManageCallService.createmchCallForChannel(createmchBean);
			
			bean.setMchId(createmchBean.getMchId());
			bean.setTemplateId(1);
			bean.setLoginName("测试商户新增客服_"+TestDataManager.getRandomIntNum(5));
			bean.setLoginPwd("111aaa");
			bean.setAppKey("appsqSeller_"+createmchBean.getMchId());
			bean.setTerminalSource(0);
			bean.setAppSource(60);


			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_createZd_002() {
		Logger.start(true,"正例-商户新增客服(业务变更)-账号不符合规则-英文或者数字或者中文,至少6位,最多8位");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_createZd_003() {
		Logger.start(true,"正例-商户新增客服(业务变更)-帐号密码不符合规则-密码可设置6-10位,数字+英文组合");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_createZd_004() {
		Logger.start(true,"正例-商户新增客服(业务变更)-templateId不存在");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_createZd_005() {
		Logger.start(true,"正例-商户新增客服(业务变更)-templateId为空");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_createZd_006() {
		Logger.start(true,"正例-商户新增客服(业务变更)-mchId不存在");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_createZd_007() {
		Logger.start(true,"正例-商户新增客服(业务变更)-mchId为空");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_createZd_008() {
		Logger.start(true,"正例-商户新增客服(业务变更)-appKey为空");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_createZd_009() {
		Logger.start(true,"正例-商户新增客服(业务变更)-channelSource为空");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_createZd_010() {
		Logger.start(true,"正例-商户新增客服(业务变更)-terminalSource为空");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_createZd_011() {
		Logger.start(true,"正例-商户新增客服(业务变更)-appSource为空");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			call.setData(bean);
			call.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}